<?php
class Product extends AppModel {
    
    var $name = 'Product';
    var $hasOne = 'Auction';
#    var $actsAs = array('Multivalidatable');

    
    var $validate = array(
        'description' => array(
            'notEmpty' => array(
                'rule' => 'notEmpty',
                'message' => 'The description must not be empty',
                'required' => true,
            )
        ),
        'price' => array(
            'notEmpty' => array(
                'rule' => 'notEmpty',
                'message' => 'The price must not be empty',
                'required' => true,
            )
        ),
        'name' => array(
            'notEmpty' => array(
                'rule' => array('minLength',5),
                'message' => 'The product name must be at least 5 characters long',
                'required' => true,
            )
        ),
        'img' => array(
            'notEmpty' => array(
                'rule' => 'notEmpty',
                'message' => 'The product image must not be empty',
                'required' => true,
            )
        )
    );

}
?>
